
import { routerConfig } from './config'

class MergeRoutes {
    routesConfig
    constructor(config) {
        this.routesConfig = config
    }
    setMergeRoutes(routes = []) {
        const { mergeRoutes } = this.routesConfig
        if (mergeRoutes) {
            return [
                routerConfig.aloneRouter,
                ...routes
            ]
        }
        return [
            routerConfig.multiRouter,
            ...routes
        ]
    }
}

export {
    MergeRoutes
}
